1. Field of the Invention
The present invention relates, in general, to the field of computer operating systems. More particularly, the present invention relates to a device input/output (xe2x80x9cI/Oxe2x80x9d) monitoring mechanism serving as a pseudo-device driver, or interface, between a computer operating system kernel and a device driver.
2. Relevant Background
Device drivers comprise that portion of a computer operating system that contains hardware specific knowledge of a particular peripheral device. Such peripheral devices may include, for example, computer mass storage devices such as disk drives, mirrored storage devices, redundant arrays of inexpensive disks (xe2x80x9cRAIDxe2x80x9d), hierarchical storage devices, virtual disks and the like. As a general rule, a particular device driver may, or may not, provide statistics back to the operating system kernel on device I/O operations according to its own predetermined metrics. Consequently, comparison of I/O statistics between devices may be rendered meaningless, very difficult or impossible due, respectively, to the possibly differing assumptions in the driver""s metrics, specific implementations or actual unavailability of the data.
To this end, while pseudo-device drivers for interfacing between an operating system kernel and a device driver have previously been developed, inter alia, to monitor device I/O, they have been generally designed with a specific piece of hardware or software implementation in mind. That is, they have been specialized xe2x80x9cpiggy-backxe2x80x9d drivers for coupling to a particular storage device or to traces generated from modified operating system software. As a result, specific knowledge of some portion of the hardware/software system being monitored was required in order to implement them.
The device I/O monitoring mechanism of the present invention obviates the necessity of implementing specific pseudo-device drivers for various peripheral devices and provides a standard interface between, for example, computer mass storage devices and a computer operating system. As a consequence, it is of especial utility in the measurement of general device I/O performance and can be utilized in conjunction with xe2x80x9copaquexe2x80x9d (or xe2x80x9cblack boxxe2x80x9d) devices without specific knowledge of their internal implementation.
More specifically, the device I/O monitoring mechanism of the present invention allows I/O statistics to be presented to application-level software operating in conjunction with a computer operating system which facilitates the identification of storage device xe2x80x9chot spotsxe2x80x9d within metadevices and sub-metadevices. The mechanism of the present invention is usable across a wide range of storage device peripheral hardware and device drivers and allows user-level program code to readily determine the associated physical sub-component.
In order to effectuate the foregoing, disclosed herein is a peripheral device I/O monitor for a computer having an operating system with a device statistics presentation mechanism resident thereon and also including a hardware abstraction layer for interfacing to an associated peripheral device. The peripheral device includes a device driver operatively responsive to the hardware abstraction layer of the computer operating system. The device I/O monitor comprises a pseudo-device driver operatively interposed between the hardware abstraction layer of the computer operating system and the device driver and itseif presents corresponding first and second pseudo-device driver hardware abstraction layers. The first pseudo-device driver hardware abstraction layer is coupled to the computer operating system and the second pseudo-device driver hardware abstraction layer is coupled to the device driver.
In accordance with a method of the present invention, I/O metrics for a peripheral device coupled to a computer may be determined wherein the computer includes a computer operating system incorporating a device driver for the peripheral device. The method comprises the steps of: intercepting one or more selected calls from the computer operating system to the device driver; providing for initiating a call back to a portion of the operating system to record an occurrence of the one or more selected calls; and providing for passing the one or more selected calls to the device driver. In accordance with a more specific method, the method may comprise the additional steps of: further intercepting one or more selected device calls from the device driver to the computer operating system; further initiating an additional call back to the operating system to record an occurrence of the one or more selected device calls; and further passing the one or more device calls to the operating system. The one or more selected calls may advantageously be xe2x80x9creadxe2x80x9d, xe2x80x9cwritexe2x80x9d or xe2x80x9cstrategyxe2x80x9d operations when utilized in conjunction with a UNIX(copyright) System V compliant operating system.